<style>
.dropdown-menu li a{
	line-height: 1.42857143;
	padding: 0px;
	width: 100%;
}
</style>
<#assign currentUser=Session['LOGIN_PLUGIN_SESSION_NAME']!''/>
<!--<div class="commnav">
    <div class="main">
        <div class="wrap cf">
            <div class="left">  
            </div>
            <div class="right">
                <div class="h-r-login">
                    搜索
                    <div class="input-group2">
                        <a>
                        <input type="text" name="search" class="form-control mate-rial" placeholder="请搜索课程..." tabindex="3">
                        <i class="glyphicon glyphicon-search"></i>
                        </a>
                    </div>

                    个人中心
                    <div class="text-right">
                        <ul class="list-inline top-dark-right">
                            <li><i class="glyphicon glyphicon-user"></i><a href="登录注册/login.htm">登录</a></li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>-->
<div class="wo-herder-gb">
	<div class="container">
		<div class="row pad-10">
			<div class="col-md-2">
				<#if currentUser=''>
				<!-- 未登录状态 -->
				<li ><a style="color: #666;font-size: 17px;line-height: 30px;padding-left: 76px;"
					href="${contextPath}/user/open/login/toLogin.do">登录</a></li> 
				</#if>
			</div>
			<div class="col-md-4 col-md-offset-4">
				<div class="input-group2">
	                <a>
	                <input id="search" type="text" name="search" class="form-control mate-rial" placeholder="请搜索课程..." tabindex="3">
	                <i class="glyphicon glyphicon-search" id="courseSearch"></i>
	                </a>
	            </div>
			</div>
			<div class="col-md-2">
				<ul class="list-inline top-dark-right">
					<#if currentUser!=''>
					<!-- 已登录状态 -->
					<li> 
						<a href="${contextPath}/opwguser/usercenter/toCenter">${currentUser.name}</a>
						<a style="text-decoration: underline;color: #337ab7;" href="${contextPath}/logout">注销</a> 
					</li>
					</#if>
				</ul>
			</div>
		</div>
	</div>
</div>
<div class="olympic-banner">
    <div class="layout">
        <div class="layout01">
               <img id="parallax-star" class="js-plaxify" data-xrange="20" data-yrange="10" data-invert="true" width="257" height="76" src="${contextPath}/images/opwg/dajingmen.png" alt="" style="top: 124.287px; left: 65%; z-index: 5;">
            <img id="parallax-football" class="js-plaxify" data-xrange="20" data-yrange="10" width="454" height="153" src="${contextPath}/images/opwg/greatwall.png" alt="" style="top: 77.7132px; left: 75%;">
        </div>
    </div>
</div>
<div class="winter-header">
    <div class="winter-nav">
        <div class="winter-logo">
            <!--导航-->
            <nav class="navbar navbar-default">
              <div class="container  con-tain-er">
              <!--切换导航-->
                <div class="navbar-header">
                  <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
                    <span class="sr-only">切换导航</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                  </button>
                </div>
                <div class="navbar-collapse collapse div" id="navbar">
                    <ul class="nav navbar-nav navbar-left" style="width:100%">
                       <li style="width:14%" class="<#if currentChannel='index'>active</#if>"><a href="${contextPath}/portal/index">首页</a></li>
                        <li style="width:14%" class="<#if currentChannel='course'>active</#if>"  role="presentation"><a class="dropdown-toggle1" href="${contextPath}/portal/courselibrary/toCourseLibrary.do">在线课程</a></li>
                         
                       <!--  <li class="<#if currentChannel='teacher'>active</#if>"><a href="${contextPath}/portal/teacher/findTeacher">培训师</a></li>
                        <li style="width:14%" class="<#if currentChannel='pavilion'>active</#if>"><a href="${contextPath}/portal/column/toPavilion">培训基地</a></li>-->
                        <li style="width:14%" class="<#if currentChannel='resource'>active</#if>"><a href="${contextPath}/portal/resource/findList">在线课件</a></li>
                        <li style="width:16%" class="<#if currentChannel='knowledgemgt'>active</#if>"><a href="${contextPath}/portal/column/toKnowledge" style="padding:0;">奥运会知识管理(OGKM)</a></li>
                        <li style="width:14%" class="<#if currentChannel='paralympicsplan'>active</#if>"><a href="${contextPath}/portal/column/toParalympicsplan">卓越计划</a></li>
                        <li style="width:14%" class="<#if currentChannel='information'>active</#if>"><a href="${contextPath}/portal/information/findList">资讯</a></li>
                        <li style="width:14%" class="<#if currentChannel='userspace'>active</#if>"><a href="${contextPath}/opwguser/usercenter/toCenter">个人空间</a></li>
                    </ul>
                </div>

              </div>
            </nav>
        </div>
    </div>
</div>
<script type="text/javascript">
 
$(function(){
	//点击搜索事件
	$("#courseSearch").click(function(){
	   var val = $(this).closest(".input-group2").find("input").val();
	   if(/^\s*$/.test(val)){
	   $(this).closest(".input-group2").find("input");
	   return;
	   }
	   window.location.href="${contextPath}/portal/frontend/dgo?ftlpath=course1.ftl#"+val;  
	    
	});
	//监听搜索的键盘事件
		$(function(){
			$("#search").bind('focus',function(){
				 var self = $(this);
				 var event = event||window.event;
				$("#search").keydown(function (event) {
					var val = self.val();
					 if(event.keyCode == 13){
					  if(/^\s*$/.test(val)){
						  self.attr('placeholder','内容不能为空');
						  return;
					  }
						window.location.href = '${contextPath}/portal/frontend/dgo?ftlpath=course1.ftl#'+val; 
					 }
				})
				
			})
		})
		//失去焦点让默认文本恢复
	   $(function(){
		   $('.navbar-nav .input-group2 input').bind('blur',function(){
			   var val = $(this).val();
			   if(/^\s*$/.test(val)){
			   $(this).val('').attr('placeholder','请搜索课程');
			   }
			   
		   })
	   })
})
  //导航滑过效果
$(document).ready(function() {
  $('.navbar-collapse li').hover(function(){ 
      $(this).addClass("active").siblings().removeClass("active"); 
  });
}); 
$(document).ready(function(){
  (function(e) {
    function l() {
        return f == true ? false : window.DeviceOrientationEvent != undefined
    }

    function c(e) {
        x = e.gamma;
        y = e.beta;
        if (Math.abs(window.orientation) === 90) {
            var t = x;
            x = y;
            y = t
        }
        if (window.orientation < 0) {
            x = -x;
            y = -y
        }
        u = u == null ? x : u;
        a = a == null ? y : a;
        return {
            x: x - u,
            y: y - a
        }
    }

    function h(e) {
        if ((new Date).getTime() < r + n) return;
        r = (new Date).getTime();
        var t = s.offset() != null ? s.offset().left : 0,
            u = s.offset() != null ? s.offset().top : 0,
            a = e.pageX - t,
            h = e.pageY - u;
        if (a < 0 || a > s.width() || h < 0 || h > s.height()) return;
        if (l()) {
            if (e.gamma == undefined) {
                f = true;
                return
            }
            values = c(e);
            a = values.x / 30;
            h = values.y / 30
        }
        var p = a / (l() == true ? o : s.width()),
            d = h / (l() == true ? o : s.height()),
            v, m;
        for (m = i.length; m--;) {
            v = i[m];
            newX = v.startX + v.inversionFactor * v.xRange * p;
            newY = v.startY + v.inversionFactor * v.yRange * d;
            if (v.background) {
                v.obj.css("background-position", newX + "px " + newY + "px")
            } else {
                v.obj.css("left", newX).css("top", newY)
            }
        }
    }
    var t = 25,
        n = 1 / t * 1e3,
        r = (new Date).getTime(),
        i = [],
        s = e(window),
        o = 1,
        u = null,
        a = null,
        f = false;
    e.fn.plaxify = function(t) {
        return this.each(function() {
            var n = -1;
            var r = {
                xRange: e(this).data("xrange") || 0,
                yRange: e(this).data("yrange") || 0,
                invert: e(this).data("invert") || false,
                background: e(this).data("background") || false
            };
            for (var s = 0; s < i.length; s++) {
                if (this === i[s].obj.get(0)) {
                    n = s
                }
            }
            for (var o in t) {
                if (r[o] == 0) {
                    r[o] = t[o]
                }
            }
            r.inversionFactor = r.invert ? -1 : 1;
            r.obj = e(this);
            if (r.background) {
                pos = (r.obj.css("background-position") || "0px 0px").split(/ /);
                if (pos.length != 2) {
                    return
                }
                x = pos[0].match(/^((-?\d+)\s*px|0+\s*%|left)$/);
                y = pos[1].match(/^((-?\d+)\s*px|0+\s*%|top)$/);
                if (!x || !y) {
                    return
                }
                r.startX = x[2] || 0;
                r.startY = y[2] || 0
            } else {
                var u = r.obj.position();
                r.obj.css({
                    top: u.top,
                    left: u.left,
                    right: "",
                    bottom: ""
                });
                r.startX = this.offsetLeft;
                r.startY = this.offsetTop
            }
            r.startX -= r.inversionFactor * Math.floor(r.xRange / 2);
            r.startY -= r.inversionFactor * Math.floor(r.yRange / 2);
            if (n >= 0) {
                i.splice(n, 1, r)
            } else {
                i.push(r)
            }
        })
    };
    e.plax = {
        enable: function(t) {
            e(document).bind("mousemove.plax", function(n) {
                if (t) {
                    s = t.activityTarget || e(window)
                }
                h(n)
            });
            if (l()) {
                window.ondeviceorientation = function(e) {
                    h(e)
                }
            }
        },
        disable: function(t) {
            e(document).unbind("mousemove.plax");
            window.ondeviceorientation = undefined;
            if (t && typeof t.clearLayers === "boolean" && t.clearLayers) i = []
        }
    };
    if (typeof ender !== "undefined") {
        e.ender(e.fn, true)
    }
})(function() {
      return typeof jQuery !== "undefined" ? jQuery : ender
  }())

  var layers = $('.js-plaxify');

  $.each(layers, function(index, layer) {
      $(layer).plaxify({
          xRange: $(layer).data('xrange') || 0,
          yRange: $(layer).data('yrange') || 0,
          invert: $(layer).data('invert') || false
      })
  });

  $.plax.enable()
});
</script>